1. Field of the Invention
The present invention relates to a numerical controller that controls a machine tool and, more particularly, to a numerical controller that carries out a positioning completion check of a rotary axis.
2. Description of the Related Art
A servo motor that drives the respective axes of a machine tool is driven by a controller such as a numerical controller so that its position and speed is controlled. Since it is difficult to drive or stop the servo rapidly, acceleration/deceleration control is generally performed for a movement command. That is, the movement command is gradually increased during acceleration or the movement command is gradually reduced during deceleration.
In order to check if the servo motor reaches an instructed position in controlling the driving of the servo motor by this type of acceleration/deceleration, the positional deviation to be stored in the error register of the servo circuit is read to determine (carry out a positioning completion check) whether the read positional deviation falls within the positioning completion width in a conventional method after movement command X becomes 0 and the acceleration/deceleration control is completed and movement command Y from a acceleration/deceleration control unit becomes 0. And if the positional deviation falls within the positioning completion width, it is determined that the servo motor reaches an instructed position, that is, positioning has been completed.
Machine tools generally check (carry out a positioning completion check) if the tool position reaches an instructed position during switching from fast forward operation to cutting forward operation. In the positioning completion check, whether the tool position reaches an instructed position is determined by the convergence of the positional deviations of servo axes to a preset level or less.
Japanese Patent Application Laid-Open No. 6-89109 discloses a method of arbitrarily setting a positioning completion width for each machining block as a prior art concerning the positioning completion check. Japanese Patent Application Laid-Open No. 2000-231412 discloses a method of making the positioning completion check using a positional deviation combined depending on the movement direction of each axis. In addition, Japanese Patent Application Laid-Open No. 5-88725 discloses a method of selectively using a plurality of positioning completion widths according to the type of an instruction.
In a machine tool including a rotary axis in addition to a linear axis, the operation of the machine tool is produced by the combination of the operation of the rotary axis and the linear axis. The amount of movement of the tool position with respect to the rotation angle of the rotary axis is proportional to the distance (that is, the rotation radius) between the center axis of rotation and the tool position. Accordingly, in case where the positioning completion width of the rotary axis is given by an angle, the width (check width) converted into the amount of movement of the tool tip along the movement path changes in proportion to the distance (rotation radius) between the center axis of the rotation and the tool tip, even if the positioning completion width (angle) is the same (see FIG. 1).
The above positioning completion check carried out, for example, during switching from fast forward operation to cutting forward operation ensures the machining precision at the starting of machining and at the end of machining. This machining precision originally ensures the precision on the workpiece, so it should be given as a linear dimension on the workpiece. If the positioning completion check of the rotary axis of a machine tool is carried out by an angle, the check width at a tool center point (or an amount of movement of the tool center point along the movement path) changes depending on (or in proportion to) the rotation radius. When the rotation radius is larger even if the angle given as the positioning completion width is the same, the check width becomes larger and whether an instructed position has been reached cannot be determined precisely.